package com.example.project.pojo;

import java.sql.Date;
import java.util.Calendar;

public class Parking {
    private Integer id;
    private Car car;
    private String region;
    private Date endTime;
    private boolean status;
    private ParkingType parkingType;
    private String beizhu;
    private Integer timeRemaining;
    private String pkStatus;

    public String getPkStatus() {
        return pkStatus;
    }

    public void setPkStatus(String pkStatus) {
        this.pkStatus = pkStatus;
    }

    public int getTimeRemaining() {
        return timeRemaining;
    }

    public void setTimeRemaining(int timeRemaining) {
        this.timeRemaining = timeRemaining;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public ParkingType getParkingType() {
        return parkingType;
    }

    public void setParkingType(ParkingType parkingType) {
        this.parkingType = parkingType;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getBeizhu() {
        return beizhu;
    }

    public void setBeizhu(String beizhu) {
        this.beizhu = beizhu;
    }
    public void yearTime(int year){
        Calendar calendar =Calendar.getInstance();
        int year1=calendar.get(Calendar.YEAR);
        year+=year1;
        calendar.set(year,calendar.get(Calendar.MONTH),calendar.get(Calendar.DAY_OF_MONTH));
        Date date =new Date(calendar.getTimeInMillis());
        this.setEndTime(date);
    }
}
